<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <link rel="stylesheet" href="http://cdn.staticfile.org/cesium/1.69.0/Widgets/widgets.css">
    <link rel="stylesheet" href="../css//index.css">
</head>

<body>
    <div class="fun-menu">
        <button onclick="test(1)">卷帘-left</button>
        <button onclick="test(2)">卷帘-right</button>
        <button onclick="test(3)">卷帘-位置(0~1之间)</button>
        <button onclick="clear1()">清除</button>
    </div>
    <div id=cesiumContainer></div>

    <script src="http://cdn.staticfile.org/cesium/1.69.0/Cesium.js"></script>

    <script src="../libs/cpc/index.js"></script>
    <script>
        const map = new cpc.Map({
            container: "cesiumContainer",
            baseMaps: [
                {
                    type: "TDTImageryLayer",
                    mold: "image",
                    tk: "7b435c61bff7f77eb49206e10d6397bd",
                },
            ],
            camera: {
                position: {
                    x: 119.4135823,
                    y: 26.11072,
                    z: 1069,
                },
                angle: {
                    heading: 0,
                    pitch: -90,
                    roll: 0,
                },
            },
            cesium: {
                infoBox: false,
                selectionIndicator: false,
            }
        });
        function test(type) {
            switch (type) {
                case 1:
                    var imageLayer = new cpc.TDTImageryLayer({
                        tk: "7b435c61bff7f77eb49206e10d6397bd",
                    })
                    map.add(imageLayer);
                    map.shutterEffect.start(imageLayer);
                    break;
                case 2:
                    var imageLayer = new cpc.TDTImageryLayer({
                        tk: "7b435c61bff7f77eb49206e10d6397bd",
                    })
                    map.add(imageLayer);
                    map.shutterEffect.start(null, imageLayer);
                    break;
                case 3:
                    var imageLayer = new cpc.TDTImageryLayer({
                        tk: "7b435c61bff7f77eb49206e10d6397bd",
                    })
                    map.add(imageLayer);
                    //0~1之间   默认:0.5
                    map.shutterEffect.start(imageLayer, null, 0.1);
                    break;
            }
        }
        function clear1() {
            map.shutterEffect.stop();
        }
    </script>
</body>

</html>